package org.demo.vo;

/**
 * 统一接口结果封装类
 *
 * @author hanjy
 * @since 2017/08/30
 */
public class ApiResult<T> {

    private T data;

    private String code;

    private String msg;

    public ApiResult() {
    }

    public ApiResult(String code, String message) {
        this.code = code;
        this.msg = message;
    }

    public ApiResult(T result) {
        this.code = "0";
        this.msg = "OK";
        this.data = result;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
